export default {
  namespaced: true,
  state: {
    apuBleedValve: true, // APU引气活门
    engine1BleedValve: true,
    engine2BleedValve: true,
    cIslnValve: true, // 中央引气隔离活门
    lIslnValve: true, // 左引气隔离活门
    rIslnValve: true, // 右引气隔离活门
    lWingAnticeIceValve: true, // 左机翼防冰活门
    rWingAnticeIceValve: true, // 右机翼防冰活门
    engine1AnticeValve: true, // 1号发动机防冰活门
    engine2AnticeValve: true, // 2号发动机防冰活门
    c1AirHydBleedValve: true, // c1空气泵引气活门
    c2AirHydBleedValve: true, // c2空气泵引气活门
    lStartValve: true, // 左起动机活门
    rStartValve: true, // 右起动机活门
    lPackValve: true, // 左空调组件流量控制活门
    rPackValve: true, // 右空调组件流量控制活门
    lTrimValve: true, // 左配平活门
    rTrimValve: true // 右配平活门
  },
  mutations: {
    toggleApuBleedValve(state) {
      state.apuBleedValve = !state.apuBleedValve
    },
    toggleEngine1BleedValve(state) {
      state.engine1BleedValve = !state.engine1BleedValve
    },
    toggleEngine2BleedValve(state) {
      state.engine2BleedValve = !state.engine2BleedValve
    },
    toggleCIslnValve(state) {
      state.cIslnValve = !state.cIslnValve
    },
    toggleLIslnValve(state) {
      state.lIslnValve = !state.lIslnValve
    },
    toggleRIslnValve(state) {
      state.rIslnValve = !state.rIslnValve
    },
    toggleLWingAnticeIceValve(state) {
      state.lWingAnticeIceValve = !state.lWingAnticeIceValve
    },
    toggleRWingAnticeIceValve(state) {
      state.rWingAnticeIceValve = !state.rWingAnticeIceValve
    },
    toggleEngine1AnticeValve(state) {
      state.engine1AnticeValve = !state.engine1AnticeValve
    },
    toggleEngine2AnticeValve(state) {
      state.engine2AnticeValve = !state.engine2AnticeValve
    },
    toggleC1AirHydBleedValve(state) {
      state.c1AirHydBleedValve = !state.c1AirHydBleedValve
    },
    toggleC2AirHydBleedValve(state) {
      state.c2AirHydBleedValve = !state.c2AirHydBleedValve
    },
    toggleLPackValve(state) {
      state.lPackValve = !state.lPackValve
    },
    toggleRPackValve(state) {
      state.rPackValve = !state.rPackValve
    },
    toggleLTrimValve(state) {
      state.lTrimValve = !state.lTrimValve
    },
    toggleRTrimValve(state) {
      state.rTrimValve = !state.rTrimValve
    },
    toggleLStartValve(state) {
      state.lStartValve = !state.lStartValve
    },
    toggleRStartValve(state) {
      state.rStartValve = !state.rStartValve
    }
  },
  actions: {
    toggleApuBleedValve({ commit }) {
      commit('toggleApuBleedValve')
    },
    toggleEngine1BleedValve({ commit }) {
      commit('toggleEngine1BleedValve')
    },
    toggleEngine2BleedValve({ commit }) {
      commit('toggleEngine2BleedValve')
    },
    toggleCIslnValve({ commit }) {
      commit('toggleCIslnValve')
    },
    toggleLIslnValve({ commit }) {
      commit('toggleLIslnValve')
    },
    toggleRIslnValve({ commit }) {
      commit('toggleRIslnValve')
    },
    toggleLWingAnticeIceValve({ commit }) {
      commit('toggleLWingAnticeIceValve')
    },
    toggleRWingAnticeIceValve({ commit }) {
      commit('toggleRWingAnticeIceValve')
    },
    toggleEngine1AnticeValve({ commit }) {
      commit('toggleEngine1AnticeValve')
    },
    toggleEngine2AnticeValve({ commit }) {
      commit('toggleEngine2AnticeValve')
    },
    toggleC1AirHydBleedValve({ commit }) {
      commit('toggleC1AirHydBleedValve')
    },
    toggleC2AirHydBleedValve({ commit }) {
      commit('toggleC2AirHydBleedValve')
    },
    toggleLPackValve({ commit }) {
      commit('toggleLPackValve')
    },
    toggleRPackValve({ commit }) {
      commit('toggleRPackValve')
    },
    toggleLTrimValve({ commit }) {
      commit('toggleLTrimValve')
    },
    toggleRTrimValve({ commit }) {
      commit('toggleRTrimValve')
    },
    toggleLStartValve({ commit }) {
      commit('toggleLStartValve')
    },
    toggleRStartValve({ commit }) {
      commit('toggleRStartValve')
    }
  },
  getters: {
    apuBleedValve: (state) => state.apuBleedValve,
    engine1BleedValve: (state) => state.engine1BleedValve,
    engine2BleedValve: (state) => state.engine2BleedValve,
    cIslnValve: (state) => state.cIslnValve,
    lIslnValve: (state) => state.lIslnValve,
    rIslnValve: (state) => state.rIslnValve,
    lWingAnticeIceValve: (state) => state.lWingAnticeIceValve,
    rWingAnticeIceValve: (state) => state.rWingAnticeIceValve,
    engine1AnticeValve: (state) => state.engine1AnticeValve,
    engine2AnticeValve: (state) => state.engine2AnticeValve,
    c1AirHydBleedValve: (state) => state.c1AirHydBleedValve,
    c2AirHydBleedValve: (state) => state.c2AirHydBleedValve,
    lPackValve: (state) => state.lPackValve,
    rPackValve: (state) => state.rPackValve,
    lTrimValve: (state) => state.lTrimValve,
    rTrimValve: (state) => state.rTrimValve,
    lStartValve: (state) => state.lStartValve,
    rStartValve: (state) => state.rStartValve
  }
}
